package com.wkbb.sports.model;

import com.wkbb.common.dto.HkBodyShapeInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class HkBody implements Serializable {

    @ApiModelProperty(value = "ID")
    private Long id;
    @ApiModelProperty(value = "体测标识")
    private Long measureId;
    @ApiModelProperty(value = "三方唯一标识")
    private String thirdId;
    @ApiModelProperty(value = "身份证号")
    private String IDCard;
    @ApiModelProperty(value = "手机号")
    private String phone;
    @ApiModelProperty(value = "姓名")
    private String name;
    @ApiModelProperty(value = "性别")
    private String sex;
    @ApiModelProperty(value = "年龄")
    private Integer age;
    @ApiModelProperty(value = "身体年龄")
    private Integer bodyAge;
    @ApiModelProperty(value = "身高")
    private String height;
    @ApiModelProperty(value = "体重")
    private Double weight;
    @ApiModelProperty(value = "体测时间")
    private String time;
    @ApiModelProperty(value = "体测总分")
    private String score;
    @ApiModelProperty(value = "体测项数")
    private Integer testItem;
    @ApiModelProperty(value = "体态评估图")
    private List<String> postureImgs;
    @ApiModelProperty(value = "体型评价数据类")
    private List<HkBodyShapeInfo> bodyShapInfoList;
    @ApiModelProperty(value = "体成分数据")
    private HkBodyComposition bodyComposition;
    @ApiModelProperty(value = "健康信息")
    private HkHealthInfo healthInfo;
    @ApiModelProperty(value = "体适能数据")
    private HkPhysicalData physicalData;
    @ApiModelProperty(value = "体态评估结果")
    private HkResultComment resultComment;

    public void initData(){
        if (bodyComposition != null) bodyComposition.initData(this);
        if (healthInfo != null) healthInfo.initData(this);
        if (physicalData != null) physicalData.initData(this);
        if (resultComment != null) resultComment.initData(this);
    }
}
